﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="GerarRelatorio.aspx.cs" Inherits="WebApplication2.GerenciarFuncionario" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
    <style type="text/css">
        #Text1
        {
            width: 332px;
        }
        #Text2
        {
            width: 325px;
        }
        #Text3
        {
            width: 180px;
        }
        #Text4
        {
            width: 178px;
        }
        #Password1
        {
            width: 175px;
        }
        .style2
        {
            width: 62px;
        }
        </style>
</asp:Content>
<asp:Content ID="menu" runat="server" ContentPlaceHolderID="MainMenu">
		<ul>
        	<li><a href="Default.aspx">Inicio</a></li>
			<li  class="current_page_item"><a href="GerenciarFuncionario.aspx">Gerenciar Funcionário</a></li>
			<li><a href="GerenciarProduto.aspx">Gerenciar Produto</a></li>
			<li><a href="GerarRelatorio.aspx">Gerar Relatórios</a></li>
            <li><a href="Contato.aspx">Contato</a></li>
            <li><a href="About.aspx">Sobre</a></li>
		    <li></li>
		</ul>
</asp:Content>
<asp:Content ID="sideBar" runat="server" ContentPlaceHolderID="SideBar">
        <h2>Gerenciar Funcionario</h2>
        <ul>
        	<li><a href="GerenciarFuncionario.aspx">Cadastrar Funcionário</a></li>
            <li><a href="ListarFuncionarios.aspx">Listar Funcionários</a></li>						
		</ul>
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <div id="post">    
        <h2>Cadastrar Funcionário</h2>
        <br />
        <asp:FormView ID="FormView1" runat="server" DataSourceID="SqlDataSource1" 
            DefaultMode="Insert" Width="497px">
            <InsertItemTemplate>
                <table style="width:100%;">
                    <tr>
                        <td class="style2">
                            Nome:</td>
                        <td>
                            <asp:TextBox ID="nomeTextBox" runat="server" Height="22px" 
                                Text='<%# Bind("nome") %>' Width="351px" />
                        </td>
                    </tr>
                    <tr>
                        <td class="style2">
                            Função:</td>
                        <td>
                            <asp:TextBox ID="funcaoTextBox" runat="server" Height="20px" 
                                Text='<%# Bind("funcao") %>' Width="343px" />
                        </td>
                    </tr>
                    <tr>
                        <td class="style2">
                            Login:</td>
                        <td>
                            <asp:TextBox ID="loginTextBox" runat="server" Height="24px" 
                                Text='<%# Bind("login") %>' Width="165px" />
                        </td>
                    </tr>
                    <tr>
                        <td class="style2">
                            Senha:</td>
                        <td>
                            <asp:TextBox ID="senhaTextBox" runat="server" Height="20px" 
                                Text='<%# Bind("senha") %>' TextMode="Password" Width="159px" />
                        </td>
                    </tr>
                </table>
                &nbsp;<br />
                
                <asp:Button ID="InsertButton" runat="server" CausesValidation="True" 
                    CommandName="Insert" Text="Cadastrar" />
                &nbsp; &nbsp;&nbsp;
            </InsertItemTemplate>
        </asp:FormView>
        <br />
        <br />
        <br />
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:almoxarifadoConnectionString1 %>" 
            SelectCommand="SELECT [nome], [funcao], [login], [senha] FROM [funcionario]"
            InsertCommand="INSERT INTO [funcionario] ([nome], [funcao], [login], [senha]) VALUES (@nome, @funcao, @login, @senha)" >
        </asp:SqlDataSource>
        <br />
        
    </div>
</asp:Content>
